extends PlayerState


func Enter() -> void:
	super.Enter()
	animated_sprite_2d.play("wall_sliding")
	
func Physic_Update(_delta:float) -> void:
	super.Physic_Update(_delta)
	player.velocity.y = -10 * _delta
	if not is_on_wall:
		transition_to("fall")
	if input_direction > 0 and not animated_sprite_2d.flip_h:
		return
	if input_direction < 0 and  animated_sprite_2d.flip_h:
		return	

	if input_direction != 0:
		player.velocity.x = 150*input_direction
		animated_sprite_2d.flip_h = input_direction<0
		transition_to("fall")
	if player.is_on_floor():
		transition_to("idle")
